package com.lxl.securitypermission.mapper;

import com.lxl.securitypermission.controller.vo.RolePermissionVo;
import com.lxl.securitypermission.controller.vo.SimpleRoleVo;
import com.lxl.securitypermission.entity.SRole;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * @Author 绫小路
 * @Date 2020/12/31
 */

public interface SRoleMapper {

  int deleteByPrimaryKey(Integer id);

  int insertSelective(SRole record);

  SRole selectByPrimaryKey(Integer id);

  int updateByPrimaryKeySelective(SRole record);

  int updateByPrimaryKey(SRole record);

  List<String> getRoleList(@Param("userId") Integer userId);

  List<SRole> getRoleLists(@Param("search") String search);

  SRole get(@Param("name") String name, @Param("status") int status);

  void delete(String name);

  void update(@Param("id") int id, @Param("name") String name, @Param("description") String description);

  List<RolePermissionVo> getRolePermission(@Param("search") String search);

  List<SimpleRoleVo> getSimpleRoleVo(@Param("status") int status);
}
